package com.jason.session;

import com.jason.config.Configuration;
import com.jason.config.MapperStatement;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface Executor {

    <E> List<E> query(Configuration configuration, MapperStatement mapperStatement, Object ... params) throws Exception;

    int update(Configuration configuration, MapperStatement mapperStatement, Object ...params) throws Exception;

    void close() throws SQLException;

    Connection getConnnection(Configuration configuration) throws SQLException;

    void commit() throws SQLException;

    void rollBack() throws SQLException;
}
